<?php

namespace Caisse\CaisseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * SessionCaisse
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Caisse\CaisseBundle\Entity\SessionCaisseRepository")
 */
class SessionCaisse
{
    
         /**
     * @ORM\OneToMany(targetEntity="Caisse\CaisseBundle\Entity\Commande", mappedBy="sessionCaisse")
     */
    private $commandes;
     
    /**
     * @ORM\ManyToOne(targetEntity="Caisse\CaisseBundle\Entity\Serveur", inversedBy="sessionCaisses")
   
     */
    private $serveur;
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="dateOuv", type="date")
     */
    private $dateOuv;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="dateFerm", type="date")
     */
    private $dateFerm;

    /**
     * @var float
     *
     * @ORM\Column(name="montantInitial", type="float")
     */
    private $montantInitial;

    /**
     * @var float
     *
     * @ORM\Column(name="montantFinal", type="float")
     */
    private $montantFinal;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set dateOuv
     *
     * @param \DateTime $dateOuv
     * @return SessionCaisse
     */
    public function setDateOuv($dateOuv)
    {
        $this->dateOuv = $dateOuv;
    
        return $this;
    }

    /**
     * Get dateOuv
     *
     * @return \DateTime 
     */
    public function getDateOuv()
    {
        return $this->dateOuv;
    }

    /**
     * Set dateFerm
     *
     * @param \DateTime $dateFerm
     * @return SessionCaisse
     */
    public function setDateFerm($dateFerm)
    {
        $this->dateFerm = $dateFerm;
    
        return $this;
    }

    /**
     * Get dateFerm
     *
     * @return \DateTime 
     */
    public function getDateFerm()
    {
        return $this->dateFerm;
    }

    /**
     * Set montantInitial
     *
     * @param float $montantInitial
     * @return SessionCaisse
     */
    public function setMontantInitial($montantInitial)
    {
        $this->montantInitial = $montantInitial;
    
        return $this;
    }

    /**
     * Get montantInitial
     *
     * @return float 
     */
    public function getMontantInitial()
    {
        return $this->montantInitial;
    }

    /**
     * Set montantFinal
     *
     * @param float $montantFinal
     * @return SessionCaisse
     */
    public function setMontantFinal($montantFinal)
    {
        $this->montantFinal = $montantFinal;
    
        return $this;
    }

    /**
     * Get montantFinal
     *
     * @return float 
     */
    public function getMontantFinal()
    {
        return $this->montantFinal;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->commandes = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add commandes
     *
     * @param \Caisse\CaisseBundle\Entity\Commande $commandes
     * @return SessionCaisse
     */
    public function addCommande(\Caisse\CaisseBundle\Entity\Commande $commandes)
    {
        $this->commandes[] = $commandes;
    
        return $this;
    }

    /**
     * Remove commandes
     *
     * @param \Caisse\CaisseBundle\Entity\Commande $commandes
     */
    public function removeCommande(\Caisse\CaisseBundle\Entity\Commande $commandes)
    {
        $this->commandes->removeElement($commandes);
    }

    /**
     * Get commandes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCommandes()
    {
        return $this->commandes;
    }

    /**
     * Set serveur
     *
     * @param \Caisse\CaisseBundle\Entity\Serveur $serveur
     * @return SessionCaisse
     */
    public function setServeur(\Caisse\CaisseBundle\Entity\Serveur $serveur = null)
    {
        $this->serveur = $serveur;
    
        return $this;
    }

    /**
     * Get serveur
     *
     * @return \Caisse\CaisseBundle\Entity\Serveur 
     */
    public function getServeur()
    {
        return $this->serveur;
    }
}